package com.emergency.embackend.service;

import com.emergency.embackend.entity.User;
import com.emergency.embackend.param.UserParam;
import com.emergency.embackend.param.UserPasswordParam;
import org.springframework.http.HttpRequest;

import javax.servlet.http.HttpServletRequest;

/**
 * @author chddd
 * @description
 * @create 2024/1/27 13:43:22
 */
public interface UserService {
    String saveCode(String phone);

    String login(UserParam userParam);

    Boolean register(UserParam userParam);

    User info(Long id);

    void update(UserParam userParam, HttpServletRequest request);

    Boolean updatePassword(UserPasswordParam userParam);

    /**
     *
     * @param phone
     * @param code
     */
    void sendCode(String phone,String code);

    /**
     * 绑定号码
     * @param phone
     * @param userId
     * @return
     */
    Boolean bindingPhone(String phone, Long userId,String code,HttpServletRequest request);
}
